package com.ysd.modules.app.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ysd.modules.app.entity.TopicEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @Author ky
 * @Date 2021/07/17
 */
@Mapper
public interface TopicDao extends BaseMapper<TopicEntity> {
    /**
     * 查询错题信息
     *
     * @return
     */
    List<TopicEntity> getWrongTopicList(Map<String, Object> map);

    /**
     * 查询试卷试题
     * @param pid
     * @return
     */
    List<TopicEntity> getTopicsByPid(Integer pid);

    /**
     * 根据课程获取章节下所有试题
     * @return
     */
    List<TopicEntity> getTopicsByCid(Integer courseId);
}
